package cn.lefull.jpa.repository;
import cn.lefull.jpa.entity.Department;
import cn.lefull.jpa.entity.PermissionMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @description: 菜单表
* @author: qijiang email:jiang1211@foxmail.com 
* @date: 2019-03-06 14:56:32 
*/
public interface PermissionMenuRepository extends JpaRepository<PermissionMenu,Long>{
    @Query("select d from PermissionMenu d where d.organizationId=1")
    List<PermissionMenu> getAll();

    @Query("insert into permission_menu_copy (create_time, delete_status, delete_time, update_time, ico, is_delete, is_external_link, menu_resource_id, name, operator_employee_id, order, organization_id, parent_permission_menu_id, resource_type, url, permission_menu_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n")
    List<PermissionMenu> insert();
}